package com.shengruan.common;

import java.io.IOException;

import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.SimpleTagSupport;

public class MenuTag extends SimpleTagSupport {
	
	private String name;
	private String url;

	public void doTag() {
		JspWriter out = getJspContext().getOut();
		StringBuffer htmlSb = new StringBuffer();
		htmlSb.append("<table width='100%' border='0' cellspacing='0' cellpadding='0' background='/assets/images/tab2_bg.png'>");
				htmlSb.append("<tr>");
		  htmlSb.append("<td><table width='100' border='0' cellspacing='0' cellpadding='0'>");
		    htmlSb.append("<tr>");
		        htmlSb.append("<td width='3'><img src='/assets/images/tab_left.png' width='3' height='21' /></td>");
		          htmlSb.append(" <td background='/assets/images/tab_bg.png' style='color:#000;font-size:12px;font-family:宋体' align='left'>"+name+"</td>");
		          htmlSb.append("<td width='8'><img src='/assets/images/tab_right.png' width='8' height='21' /></td>");
		          htmlSb.append("</tr>");
		        htmlSb.append("</table></td>");
		    htmlSb.append("<td></td>");
		    htmlSb.append("</tr>");
		  htmlSb.append("</table>");
		try 
		{
			out.println(htmlSb.toString());
		} 
		catch (IOException e) 
		{

		}
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
}
